Optimal. Leaf size=41 \[ x (1+x)^p \left (1-x+x^2\right )^p \left (1+x^3\right )^{-p} \, _2F_1\left (\frac {1}{3},-p;\frac {4}{3};-x^3\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {727, 251}
\begin {gather*} x (x+1)^p \left (x^2-x+1\right )^p \left (x^3+1\right )^{-p} \, _2F_1\left (\frac {1}{3},-p;\frac {4}{3};-x^3\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 251
Rule 727
Rubi steps
\begin {align*} \int (1+x)^p \left (1-x+x^2\right )^p \, dx &=\left ((1+x)^p \left (1-x+x^2\right )^p \left (1+x^3\right )^{-p}\right ) \int \left (1+x^3\right )^p \, dx\\ &=x (1+x)^p \left (1-x+x^2\right )^p \left (1+x^3\right )^{-p} \, _2F_1\left (\frac {1}{3},-p;\frac {4}{3};-x^3\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 0.10, size = 132, normalized size = 3.22 \begin {gather*} \frac {\left (\frac {i+\sqrt {3}-2 i x}{3 i+\sqrt {3}}\right )^{-p} \left (\frac {-i+\sqrt {3}+2 i x}{-3 i+\sqrt {3}}\right )^{-p} (1+x)^{1+p} \left (1-x+x^2\right )^p F_1\left (1+p;-p,-p;2+p;\frac {2 i (1+x)}{3 i+\sqrt {3}},-\frac {2 i (1+x)}{-3 i+\sqrt {3}}\right )}{1+p} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.45, size = 0, normalized size = 0.00 \[\int \left (x +1\right )^{p} \left (x^{2}-x +1\right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (x + 1\right )^{p} \left (x^{2} - x + 1\right )^{p}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (x+1\right )}^p\,{\left (x^2-x+1\right )}^p \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________